********** Beginning of RDML commands **********
FUNCTION   OPTIONS(*DIRECT)
**********
DEFINE     FIELD(#JSMSTS) TYPE(*CHAR) LENGTH(20)
DEFINE     FIELD(#JSMCMD) TYPE(*CHAR) LENGTH(255)
DEFINE     FIELD(#JSMMSG) TYPE(*CHAR) LENGTH(255)
**********
USE        BUILTIN(JSM_OPEN) WITH_ARGS('LOCALHOST:7560') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CHANGE     FIELD(#JSMCMD) TO('SERVICE_LOAD SERVICE(EXCELSERVICE) TRACE(*YES)')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('CREATE') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('''ADD OBJECT(*SHEET) SHEET(MyTest)''') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CHANGE     FIELD(#JSMCMD) TO('ADD OBJECT(*IMAGE) R1C1(5,8) FILE(test-input/boat.png) RESIZE(0.5) ANCHOR(*MOVE)')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
CHANGE     FIELD(#JSMCMD) TO('''SAVE FILE(test-output/JTSTE21.xlsx)''')
USE        BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('CLOSE') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_COMMAND) WITH_ARGS('SERVICE_UNLOAD') TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
USE        BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
EXECUTE    SUBROUTINE(CHECK) WITH_PARMS(#JSMSTS #JSMMSG)
**********
********** SUB ROUTINES
**********
SUBROUTINE NAME(CHECK) PARMS((#JSMSTS *RECEIVED) (#JSMMSG *RECEIVED))
**********
IF         COND('#JSMSTS *NE OK')
DISPLAY    FIELDS((#JSMSTS) (#JSMMSG))
**********
USE        BUILTIN(JSM_CLOSE) TO_GET(#JSMSTS #JSMMSG)
**********
MENU       MSGTXT('Java service error has occured')
**********
ENDIF
**********
ENDROUTINE
********** End of RDML commands **********